<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="./js/vue.js"></script>
    <style>
        div>div{
            width: 100px;
            height: 100px;
            border: 2px solid #bbb;
            text-align: center;
            line-height: 100px;
            font-size: 50px;
            margin: 10px;
            float: left;
        }
        .selet{
            border-color: black;
        }
        .active{
            background-color: #bbb;
        }
    </style>
</head>

<body>
    <div id="app">
        <div v-bind:class="{selet:div1.selet,active:div1.active}">1</div>
        <div class="selet">2</div>
        <div class="active">3</div>
        <div class="selet">4</div>

    </div>
    <script>
        // v-bind  标签属性的动态绑定 v-bind:url src class
        // 简写‘：’ 
        // 绑定动态属性值{{}}
        let vm = new Vue({
            el: '#app',
            data: {
                div1:{selet:true,active:true},
                div2:{selet:false,active:true}
            },
            methods: {}
        })
    </script>
</body>

</html>